home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / VideoToolbox 96.06.15 / VideoToolboxSources / TitleBarHeight.c < prev    next >
Text File  |  1993-02-23  |  427b  |  23 lines

  1. /*
  2. TitleBarHeight.c
  3. Returns the height of a window's title bar, in pixels.
  4.  
  5. HISTORY:
  6. 12/29/91 dgp extracted from Zoom.c
  7. */
  8. #include "VideoToolbox.h"
  9.  
  10. int TitleBarHeight(WindowPtr window)
  11. {
  12.     WindowPtr oldPort;
  13.     int headRoom;
  14.     Point pt;
  15.     
  16.     GetPort(&oldPort);
  17.     SetPort(window);
  18.     pt.v=window->portRect.top;
  19.     LocalToGlobal(&pt);
  20.     headRoom=pt.v-1-(*((WindowPeek)window)->strucRgn)->rgnBBox.top;
  21.     SetPort(oldPort);
  22.     return headRoom;
  23. }